<!DOCTYPE html>
<html>
<head>
	<title></title>
	
</head>
<body>
	<div>hello</div>
	<div id="main">world</div>
	<div>heima</div>

	<script type="text/javascript">
		var main = document.getElementById('main');
		// console.log(main);
		console.dir(main);
		var divs = document.getElementsByTagName('div');
		console.log(divs);
		for (var i = 0; i < divs.length; i++)
		{
			console.log(divs[i]);
		}
	</script>
</body>
</html>